package buildings.office;

import buildings.Space;
import buildings.dwelling.Flat;
import java.io.Serializable;

public class OfficeNode implements Serializable, Cloneable {
    private Space element;
    private OfficeNode next;
    
    public OfficeNode()
    {
        element = new Office();
        next = null;
    }
    
    public OfficeNode(Space office)
    {
        element = office;
        next = null;
    }
    
    public Space getElement()
    {
        return element;
    }
    
    public OfficeNode getNext()
    {
        return next;
    }
    
    public void setElement(Space element)
    {
        this.element = element;
    }
    
    public void setNext(OfficeNode next)
    {
        this.next = next;
    }

    public Object clone() throws CloneNotSupportedException {
        Object result = super.clone();
        ((OfficeNode)result).element = (Space)element.clone();
        ((OfficeNode)result).next = (OfficeNode)next.clone();
        return result;
    }
    
    
}
